package com.tas.mydb;

import com.tas.mydb.dao.UserInfoDao;
import com.tas.mydb.entity.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;


@RestController
public class TestController {

    @Autowired
    private UserInfoDao userInfoDao;

    @GetMapping("/Name")
    public String GetName(){
        UserInfo userInfo= userInfoDao.selectByMap(new HashMap<String, Object>(){{put("UserId",666);}}).get(0);
        return userInfo.getNickName();
    }
}
